
from common.excel import OldExcel,NewExcel

def get_reader(srcfile='../../lib/一手app.xlsx'):
    if srcfile.endswith('.xls'):
        reader=NewExcel.Reader()
        reader.openexcel(srcfile)

        return reader
    elif srcfile.endswith('.xlsx'):
        reader=OldExcel.Reader()
        reader.openexcel(srcfile)
        return reader


if __name__ == '__main__':
    reader=get_reader('../../lib/一手app-test.xlsx')
    sheets=reader.get_sheets()
    for sheet in  sheets:
        reader.set_sheets(sheet)
        reader.readline()

